﻿using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace Api.Shared.Model
{
    public class DB91Finished : INotifyPropertyChanged
    {
        public bool IsWorking { get; set; }
        public bool Worked
        {
            get => worked;
            set
            {
                if (worked != value && value == true)
                {
                    NotifyPropertyChanged();
                }
                worked = value;
            }
        }
        public short ArcWire { get; set; }
        public short Gas { get; set; }
        public short Comment1 { get; set; }
        public short Comment2 { get; set; }
        public short Comment3 { get; set; }
        public short Comment4 { get; set; }

        private bool worked;

        public virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        public event PropertyChangedEventHandler? PropertyChanged;
    }
}
